﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model;
using HengTong.Model.Db.Hr.Bill;
using TiaoTaoHelper.Wtm.Models;


namespace HengTong.ViewModel.Hr.SysHrResignRequestBillVms
{
    public partial class SysHrResignRequestBillTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工工号")]
        public ExcelPropety StaffNoExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.StaffNo);
        [Display(Name = "员工姓名")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.Name);
        [Display(Name = "离职类型")]
        public ExcelPropety ResignTypeExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.ResignType);
        [Display(Name = "离职日期")]
        public ExcelPropety ResignDateExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.ResignDate);
        [Display(Name = "离职原因")]
        public ExcelPropety ResignReasonExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.ResignReason);
        [Display(Name = "审批人")]
        public ExcelPropety ApproverExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.Approver);
        [Display(Name = "审批时间")]
        public ExcelPropety ApprovalTimeExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.ApprovalTime);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.GroupId);
        [Display(Name = "单据编号")]
        public ExcelPropety BillCodeExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.BillCode);
        [Display(Name = "单据状态")]
        public ExcelPropety BillStatusExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.BillStatus);
        [Display(Name = "工作流状态")]
        public ExcelPropety WorkflowStatusExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.WorkflowStatus);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysHrResignRequestBill>(x => x.Remark);

	    protected override void InitVM()
        {
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.GroupName);
        }

    }

    public class SysHrResignRequestBillImportVm : BaseImportVM<SysHrResignRequestBillTemplateVm, SysHrResignRequestBill>
    {

    }

}
